﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Interactivity;

namespace WpfWordsLearner
{
	public class ActionClosing : TriggerAction<Window>
	{
		protected override void OnAttached()
		{
			base.OnAttached();
		}

		protected override void OnDetaching()
		{
			base.OnDetaching();
		}

		//
		// To invoke any associated Actions when this Trigger gets called, use
		// this.InvokeActions(o) where o is an object that you can pass in as a parameter
		//

		protected override void Invoke(object parameter)
		{
			if(this.AssociatedObject!=null)
			{
				AssociatedObject.Effect = new Microsoft.Expression.Media.Effects.SwirlEffect();
			}
		}
	}
}